console.log(Math.min(3, 1, 8)); // 1
const a = [3, 1, 8];
console.log(Math.min(...a)); // 1
